﻿$(init());

function init(){
    console.log("youpuma running!");
    var element = $("[class='side svelte-1pt5uwh']")[0];

    var div = $('<div>打印</div>');
    div.attr('id','printer');
    $(div).css({"font-weight":"bold", "line-height": "40px", "font-size":"1em", "color":"black","background-color":"gold", "text-align":"center", "width:": "100%", "height": "40px", "border-radius": "20px"});



    $(div).bind("click",function(){
        var panel = $("[class='main svelte-1pt5uwh']")[0];
        document.body.innerHTML = panel.innerHTML;
        window.print();
        window.location.reload();//刷新页面
    });


    $(div).hover(function(){
        $(div).css("cursor","pointer");
    },function(){
        $(div).css("cursor","default");
    });

    $(element).append(div);
}




